package com.sikaryofficial.system.api;

import com.sikaryofficial.common.core.constant.ServiceNameConstants;
import com.sikaryofficial.common.core.domain.R;
import com.sikaryofficial.system.api.factory.RemoteWorkBenchFallbackFactory;
import com.sikaryofficial.system.api.model.goods.GoodsTasteResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 工作台服务
 *
 * @author qinjinyuan
 */
@FeignClient(contextId = "remoteWorkBenchService", value = ServiceNameConstants.WORKBENCH_SERVICE, fallbackFactory = RemoteWorkBenchFallbackFactory.class)
public interface RemoteWorkBenchService {

    /**
     * 初始化渠道商用户信息
     *
     * @return 结果
     */
    @GetMapping("/goods/removeCache")
    R<Void> removeGoodsCache();

    /**
     * 获取商品口味数据
     * @param brandNo
     * @param keyWord
     * @param size
     * @return
     */
    @GetMapping("/listGoodsTaste")
    R<List<GoodsTasteResp>> listGoodsTaste(@RequestParam(name = "brandNo") String brandNo,
                                           @RequestParam(name = "keyWord") String keyWord,
                                           @RequestParam(name = "size", defaultValue = "10") Integer size);
}
